#ifndef DEVICE_H
#define DEVICE_H


#include"Command.h"
#include <QObject>
#include <iostream>

//纯虚函数抽象类
class Device : public QObject
{
    Q_OBJECT
public:
    //关键字explicit:明显的。该构造函数必须手动调用
    explicit Device(){};
    ~Device(){};

    virtual bool open()=0;
    virtual void scan()=0;
     virtual void doWork()=0;


     //向外界发送信号
signals:
    virtual   void sendDataToOtherDevice(std::shared_ptr<YCN::Command>cmd);
     //接收外界来的信号
public slots:
   virtual  void onOtherDevice(std::shared_ptr<YCN::Command>cmd)=0;


public:
    QString name_;
    QString id_;
    QString role_;
    std::shared_ptr<QPixmap>pix_map_;
};

#endif // DEVICE_H
